[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Procedure ScreenOrigin(X,Y:Word)
Updates VX and VY : Yes
Updates Cursor Position : Yes
This moves the screen origin. That is, where the top left corner of
the screen is on the virtual page. This uses X and Y in pixels
and can thus be used for smooth scrolling. The top left corner is
(0,0).
VGA Example (9x16 pixels)
ScreenOrigin(18,16)
moves the viewable area to text position (3,2). To view the top
left corner (text position (1,1)), one would use
ScreenOrigin(0,0).
###########################################
##(1,1) ##
## ##
## ########## ##
## #(3,2) # ##
## # # ##
## # # ####################### ##
## ########## #(82,15) # ##
## # # ##
## ####################### ##
## ##
## ##
## ##
## (160,50)##
###########################################
Above, the complete virtual screen is (1,1) to (160,50), indicated
by #####. This is created with
SetVirtualScreen(160,50).
The area of this virtual screen that appears on the user's monitor
is indicated by #####. The lower right corner of this area is
determined by the text mode and the amount of text that mode can
display at one time. Most users use text mode 3, 80x25.
Finally, the area that is written to by the program is the window
area, indicated by #####. This is setup with
Window(82,15,150,40).
The window area may be any size. By using the above window, one can
use
GotoXY(1,1)
and this will move the cursor to position (82,15).
See Also:
Procedure SetVirtualScreen
Procedure Window
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson